//
//  ContentTableViewCell.swift
//  HLSwiftWork
//
//  Created by hulinhu on 2018/6/12.
//  Copyright © 2018年 hulinhu. All rights reserved.
//

import UIKit

class ContentTableViewCell: UITableViewCell {
    
    // 全局初始化
    var sview : UIView?
    var titleLabel : UILabel?
    var imageV: UIImageView?
    
    override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
        
        super.init(style: style, reuseIdentifier: reuseIdentifier)

        // 底部试图
        sview = UIView.init(frame: CGRect(x: 0, y: 0, width: kScreenWidth, height: 50))
        sview?.backgroundColor = UIColor.yellow
        contentView.addSubview(sview!)
        
        //  图片
        imageV = UIImageView.init(frame: CGRect(x: 15, y: 10, width: 107, height: 30))
        sview?.addSubview(imageV!)
        
        
        // 标题
        titleLabel = UILabel.init(frame: CGRect(x: (imageV?.zc_right)!+30, y: 50, width: 80, height: 50))
        titleLabel?.font = UIFont.systemFont(ofSize: 13)
        sview?.addSubview(titleLabel!)
        
    }
    
    public func setupModel(_ title : String , imageName : String )  {
        imageV?.image = UIImage.init(named: imageName)
        titleLabel?.text = title

    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
}
